﻿using System.Collections.Generic;
using com.guojin.core.io;
using com.guojin.core.io.message;


namespace com.guojin.mj.net.message.game
{
    public class MidChangeRoomInfoReq: Message
    {
        public static int TYPE = 12 ;
        public static int ID =  39 ;

        public int changeType { get; set; }
        public int minScore { get; set; }
        public int maxScore { get; set; }
        public int addTime { get; set; }
        public string roomId { get; set; }

        public void decode(Input _in)
        {
          
        }

        public void encode(Output _out)
        {
            _out.writeInt(changeType);
            _out.writeInt(minScore);
            _out.writeInt(maxScore);
            _out.writeInt(addTime);
            _out.writeString(roomId);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return string.Format("MidChangeRoomInfoReq[changeType= {0},minScore={1}, maxScore={2}, addTime={3}], roomid = {4}",changeType, minScore, maxScore, addTime, roomId);
        }

        public static MidChangeRoomInfoReq create(int changeType, int minScore, int maxScore, int addTime, string roomId)
        {
            var temp = new MidChangeRoomInfoReq();
            temp.changeType = changeType;
            temp.minScore = minScore;
            temp.maxScore = maxScore;
            temp.addTime = addTime;
            temp.roomId = roomId;
            return temp;
        }
    }
}